<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>管理后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8"/>
    <link rel="stylesheet" href="/style/x_admin/css/font.css">
    <link rel="stylesheet" href="/style/x_admin/css/xadmin.css">
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/style/x_admin/js/xadmin.js"></script>
    <script type="text/javascript" src="/static/modules.js?v={{style_ver}}"></script>
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <blockquote class="layui-elem-quote">数据表管理</blockquote>
                </div>
            </div>
        </div>
        <div class="layui-col-md12" style="margin-top:-25px;">
            <div class="layui-card">
                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>表名</th>
                            <th>类型</th>
                            <th>编码</th>
                            <th>数据量</th>
                            <th>数据大小</th>
                            <th>创建时间</th>
                            <th>碎片</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% if dataList %}
                        {% set loopInt=1 %}
                        {% for key,item in dataList %}
                        <tr>
                            <td>{{loopInt}}</td>
                            <td>{{item['Name']}}</td>
                            <td>{{item['Engine']}}</td>
                            <td>{{item['Collation']}}</td>
                            <td>{{item['Rows']}}</td>
                            <td>{{item['Data_length']}}</td>
                            <td>{{item['Create_time']}}</td>
                            <td>{{item['Data_free']}}</td>
                            <td>
                                <a href="javascript:;" class="listForOptimize" data-tn="{{item['Name']}}">优化</a>
                                <a href="javascript:;" class="listForRepair" data-tn="{{item['Name']}}">修复</a>
                            </td>
                        </tr>
                        {% set loopInt+=1 %}
                        {% endfor %}
                        {% else %}
                        <tr>
                            <td colspan="9">
                                暂无数据.
                            </td>
                        </tr>
                        {% endif %}
                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body ">
                    <div class="page"></div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['general_database'], function () {
        let m = layui.general_database;
        m.initList();
    });
</script>
</html>
